<script setup>
import {ref,defineEmits,defineProps} from "vue";
import { pcaTextArr } from "element-china-area-data";
import request  from '@/api/request'

let props=defineProps(["data"])

let emits=defineEmits(["ref-table"])

let pending_payment_id={...props.data};
let Pending_payment=ref({})

let onSubmit=()=>{
    //修改
        // request({
        //     url:"/system/permission/role/insert",
        //     method:"post",
        //     data:Customer_Resources.value
        // }).then(res=>{
            emits("ref-table")
        // })
}
let location=()=>{
    alert("查询");
    // request({
    //     //查询客户
    //     url:"",
    //     method:"get",
    //     data:to_be_collected_id
    // }
    // }).then(res=>{
    //     To_be_collected.value=res.value
    // })
}

location();




</script>
<template>
    <div>
        <el-card>
            <template #header>
                <el-form :model="Pending_payment" ref="form" :rules="rules" :inline="false" class="card_wrap">
                    <el-form-item label="申请付款员工"  prop="pending_payment_employee_id" class="c_item">
                            <el-select placeholder="申请付款员工" v-model="Pending_payment.pending_payment_employee_id" style="width: 150px;">
                                <!-- <el-option v-for="item in customers" :label="item.name" :value="item.id">
                                </el-option> -->
                            </el-select>
                    </el-form-item>
                    <el-form-item label="采购单编码:" prop="pending_payment_purchase_order_id" class="c_item">
                            <el-select placeholder="采购单编码" v-model="Pending_payment.pending_payment_purchase_order_id" style="width: 150px;">
                                <!-- <el-option v-for="item in customers" :label="item.name" :value="item.id">
                                </el-option> -->
                            </el-select>
                    </el-form-item>
                    <el-form-item label="批次付款" prop="pending_payment_batch" class="c_item">
                            <el-select placeholder="批次付款" v-model="Pending_payment.pending_payment_batch" style="width: 150px;">
                                <el-option value="一次" label="一次"></el-option>
                                <el-option value="二次" label="二次"></el-option>
                                <el-option value="三次" label="三次"></el-option>
                            </el-select>
                    </el-form-item>
                    <el-form-item label="应付金额" prop="pending_payment_cope" class="c_item">
                             <el-input v-model="Pending_payment.pending_payment_cope" disabled style="width:150px;"></el-input>
                    </el-form-item>
                    <el-form-item label="付款金额" prop="pending_payment_payment" class="c_item">
                              <el-input-number v-model="Pending_payment.to_be_collected_collection" :min="1" :max="1000000"/>
                    </el-form-item>
                    <el-form-item label="代付款金额" prop="pending_payment_money" class="c_item">
                             <el-input v-model="Pending_payment.pending_payment_money" disabled style="width:150px;"></el-input>
                    </el-form-item>
                    <el-form-item label="付款时间：" prop="pending_payment_Payment time" class="c_item">
                            <el-date-picker v-model="Pending_payment.pending_payment_Payment_time" type="datetime" placeholder="选择日期时间">
                            </el-date-picker>
                    </el-form-item>
                    <el-form-item label="预计下次付款时间：" prop="pending_payment_next_time time" class="c_item">
                            <el-date-picker v-model="Pending_payment.pending_payment_next_time" type="datetime" placeholder="选择日期时间">
                            </el-date-picker>
                    </el-form-item>
                   
                    <el-form-item>
                        <el-button type="primary" @click="onSubmit">立即添加</el-button>
                    </el-form-item>
                </el-form>
            </template>
        </el-card>
    </div>
</template>
<style scoped>

.card_wrap {
    width: 98%;
    display: flex;
    flex-wrap: wrap;
    justify-content:flex-start;
}
.c_item{
    flex:1;
    margin:0px 5px 15px 0;
    width: calc((100%-0px)/2); 
    min-width:calc((100% - 10px)/2);
    max-width:calc((100% - 10px)/2);
}
</style>